/**
 * Created by dylan_Apple on 16/12/20.
 */
/**
 * Created by dylan_Apple on 16/12/5.
 */
/**
 * Created by Amaris on 2016/10/9.
 */

var Waterline = require('waterline');
var uuid = require('node-uuid');

/**
 * 行业表
 * @type {void|*}
 * 目前路演推荐有  行业深度推荐  公司深度推荐
 */
module.exports = Waterline.Collection.extend({
    identity: 'industry',
    tableName: 'tb_industry',
    connection: "mysql",
    attributes: {

        rowId: {
            type: 'string',
            unique: true,
            primaryKey: true,
            required: true,
            uuidv4: true,
            columnName: 'rowid',
            defaultsTo: function() {
                return uuid.v4();
            }
        },
        industryName: {
            type: 'string',
            required: true,
            columnName: 'industryname'
        },
        industry: {
            collection: 'surveying',
            via: 'industry'
        },
    },
    autoCreatedAt: false,
    autoUpdatedAt: false
});